#!/usr/bin/python

import bz2

class BZ2Compressor:
	def __init__(self, compressionLevel=9):
		self.level = compressionLevel
		
	def compress(self, string):
		return bz2.compress(string, self.level)
	
	def decompress(self, string):
		return bz2.decompress(string)